package com.ruoyi.type.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.type.mapper.DocumentaryMapper;
import com.ruoyi.type.domain.Documentary;
import com.ruoyi.type.service.IDocumentaryService;

/**
 * 纪录片Service业务层处理
 * 
 * @author ucu
 * @date 2024-05-04
 */
@Service
public class DocumentaryServiceImpl implements IDocumentaryService 
{
    @Autowired
    private DocumentaryMapper documentaryMapper;

    /**
     * 查询纪录片
     * 
     * @param id 纪录片主键
     * @return 纪录片
     */
    @Override
    public Documentary selectDocumentaryById(Long id)
    {
        return documentaryMapper.selectDocumentaryById(id);
    }

    /**
     * 查询纪录片列表
     * 
     * @param documentary 纪录片
     * @return 纪录片
     */
    @Override
    public List<Documentary> selectDocumentaryList(Documentary documentary)
    {
        return documentaryMapper.selectDocumentaryList(documentary);
    }

    /**
     * 新增纪录片
     * 
     * @param documentary 纪录片
     * @return 结果
     */
    @Override
    public int insertDocumentary(Documentary documentary)
    {
        return documentaryMapper.insertDocumentary(documentary);
    }

    /**
     * 修改纪录片
     * 
     * @param documentary 纪录片
     * @return 结果
     */
    @Override
    public int updateDocumentary(Documentary documentary)
    {
        return documentaryMapper.updateDocumentary(documentary);
    }

    /**
     * 批量删除纪录片
     * 
     * @param ids 需要删除的纪录片主键
     * @return 结果
     */
    @Override
    public int deleteDocumentaryByIds(Long[] ids)
    {
        return documentaryMapper.deleteDocumentaryByIds(ids);
    }

    /**
     * 删除纪录片信息
     * 
     * @param id 纪录片主键
     * @return 结果
     */
    @Override
    public int deleteDocumentaryById(Long id)
    {
        return documentaryMapper.deleteDocumentaryById(id);
    }
}
